﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JobEdit.aspx.cs" Inherits="FxhjpgWeb.WebSite.WebAdmin.JobEdit" %>

<%@ Import Namespace="System.Collections.Generic" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>猎头岗位管理</title>
    <link href="/css/admin/admin.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="/js/jquery.js"></script>    
    <script type="text/javascript" src="/js/admin/admin.js"></script>
    <script language="javascript" type="text/javascript" src="/js/DatePicker/WdatePicker.js"></script>  
    <!--kindEditor配置Begin-->
    <link rel="stylesheet" href="/js/kindeditor/themes/default/default.css" />
    <link rel="stylesheet" href="/js/kindeditor/plugins/code/prettify.css" />
    <script type="text/javascript" charset="gbk" src="/js/kindeditor/kindeditor-min.js?v=4.1.7"></script>
    <script type="text/javascript" charset="gbk" src="/js/kindeditor/lang/zh_CN.js?v=4.1.7"></script>
    <script type="text/javascript" charset="gbk" src="/js/kindeditor/plugins/code/prettify.js?v=4.1.7"></script>
    <script type="text/javascript">
        //此编辑器初始化参数请参考http://www.kindsoft.net/docs/option.html
        var editor;
        KindEditor.ready(function (K) {
            editor = K.create('#Description', {
                cssPath: '/js/kindeditor/plugins/code/prettify.css',
                filterMode: false,
                urlType: 'domain',
                uploadJson: '/WebAdmin/ajax/upload_json.ashx?width=600&height=520'   //指定上传文件的服务器端程序
                //fileManagerJson: 'Ajax/file_manager_json.ashx',     //指定浏览远程图片的服务器端程序
                //allowFileManager: false
            });
            prettyPrint();
        });
    </script>
    <!--kindEditor配置End-->
</head>
<body>
    <div class="titlebt"><%=id > 0 ? "修改猎头岗位" : "新建猎头岗位"%></div>
    <!--显示列表-->
    <div id="all">
        <div class="k_all3">
            <form action="" method="post" onsubmit="return checkdata();">
            <table width="100%" cellpadding="0" cellspacing="0" id="bk">
                <tbody>
                    <tr>
                        <td width="100" height="35" align="right">
                            <span class="red">*</span>猎头岗位分类：
                        </td>
                        <td width="990">
                            <select id="Cid" name="Cid" data-val="true" data-val-required="*请选择猎头岗位分类！">
                                <option value="">-请选择-</option>        
                                <%
                                    foreach (var item in teamClassList)
                                    { 
                                %>
                                <option value="<%=(int)item.Id %>" <%=(int)item.Id==info.Cid?"selected=\"selected\"":"" %>><%=item.Name %></option>
                                <%   
                                    }
                                %>
                            </select>
                            <span class="field-validation-valid" data-valmsg-for="Cid" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            <span class="red">*</span>猎头岗位名称：
                        </td>
                        <td width="990">
                            <input id="Name" type="text" name="Name" value="<%=info.Name %>" data-val="true" data-val-required="*请填写猎头岗位名称！"/>
                            <span class="field-validation-valid" data-valmsg-for="Name" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            <span class="red">*</span>招聘人数：
                        </td>
                        <td width="990">
                            <input id="NeedNum" type="text" name="NeedNum" value="<%=info.NeedNum %>" data-val="true" data-val-required="*请填写招聘人数！"  data-val-number="*招聘人数必须填写数字！"/>
                            <span class="field-validation-valid" data-valmsg-for="NeedNum" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            <span class="red">*</span>工资待遇：
                        </td>
                        <td width="990">
                            <select id="Shalary" name="Shalary" data-val="true" data-val-required="*请选择工资待遇！">
                                <option value="">-请选择-</option>        
                                <%
                                    foreach (KeyValuePair<ShalaryEnum, string> item in EnumExte.ShalaryEnums)
                                    {
                                %>
                                <option value="<%=(int)item.Key %>" <%=(int)item.Key==info.Shalary?"selected=\"selected\"":"" %>><%=item.Key.GetDesc() %></option>
                                <%   
                                    }
                                %>
                            </select>
                            <span class="field-validation-valid" data-valmsg-for="Shalary" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            工作地点：
                        </td>
                        <td width="990">
                            <input type="text" name="WorkingPlace" value="<%=info.WorkingPlace %>" />
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            <span class="red">*</span>学历要求：
                        </td>
                        <td width="990">
                            <select id="RequiredDegree" name="RequiredDegree" data-val="true" data-val-required="*请选择学历要求！">
                                <option value="">-请选择-</option>
                                <%
                                    foreach (KeyValuePair<RequiredDegreeEnum, string> item in EnumExte.RequiredDegreeEnums)
                                    {
                                %>
                                <option value="<%=(int)item.Key %>" <%=(int)item.Key==info.RequiredDegree?"selected=\"selected\"":"" %>><%=item.Key.GetDesc() %></option>
                                <%   
                                    }
                                %>
                            </select>
                            <span class="field-validation-valid" data-valmsg-for="RequiredDegree" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            <span class="red">*</span>性别要求：
                        </td>
                        <td width="990">
                            <%
                                foreach (KeyValuePair<SexEnum, string> item in EnumExte.SexEnums)
                                {
                            %>
                            <label><input name="Sex" type="radio" value="<%=(int)item.Key %>" <%=(int)item.Key==info.Sex?"checked=\"checked\"":"" %> /> <%=item.Key.GetDesc() %></label>
                            <%   
                                }
                            %>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            所属部门：
                        </td>
                        <td width="990">
                            <input type="text" name="Department" value="<%=info.Department %>" />
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            <span class="red">*</span>工作经验：
                        </td>
                        <td width="990">
                            <select  id="WorkExperience" name="WorkExperience" data-val="true" data-val-required="*请选择工作经验！">
                                <option value="">-请选择-</option>
                                <%
                                    foreach (KeyValuePair<WorkExperienceEnum, string> item in EnumExte.WorkExperienceEnums)
                                    {
                                %>
                                <option value="<%=(int)item.Key %>" <%=(int)item.Key==info.WorkExperience?"selected=\"selected\"":"" %>><%=item.Key.GetDesc() %></option>
                                <%   
                                    }
                                %>
                            </select>
                            <span class="field-validation-valid" data-valmsg-for="WorkExperience" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            有效时间：
                        </td>
                        <td width="990">
                            <input type="text" name="EffectiveDate" value="<%=info.EffectiveDate %>" onClick="WdatePicker()"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" height="35" align="right">
                            <span class="red">*</span>猎头岗位描述：
                        </td>
                        <td width="990">
                            <span id="field-Description" class="field-validation-error" style="display:none">*请填写猎头岗位描述！</span>
                            <textarea id="Description" name="Description" style="width: 90%; height: 250px;"><%=HttpUtility.HtmlDecode(info.Description)%></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" height="35">
                            <div class="pl200">
                                <input type="submit" class="butt_tle" style="width: 50px" value="确定" />
                                <input type="button" class="butt_tle" style="width: 80px" value="返回列表" onclick='location.href="<%=FxhjpgWeb.WebSite.Code.Utility.GetUrlReferrer(Request, "JobList.aspx", "JobEdit.aspx") %>"'/>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
            </form>
        </div>
    </div>
    <script type="text/javascript">
        function checkdata() {
            if (editor.text() == "") {
                $("#field-Description").show();
                return false;
            }
            return true;
        }
    </script>
</body>
</html>